<!--
 * @Author: weikang
 * @Description:
 * @Date: 2024-03-20 21:08:36
 * @LastEditTime: 2024-03-30 14:15:35
 * @FilePath: \env-manager-pc\src\views\dashboard\index.vue
-->
<script setup lang="ts">
import yunweiDashboard from './yunwei/index.vue'
import huanjingDashboard from './huanjing/index.vue'
import qiyeDashboard from './qiye/index.vue'
import useUserStore from '@/store/modules/user'
import { AccountType } from '@/api/modules/types/user'

const userStore = useUserStore()

const dashboard = computed(() => {
  switch (userStore.userInfo.AffiliatedObjType) {
    case AccountType.EnvOrg:
      return huanjingDashboard
    case AccountType.OwnerOrg:
      return yunweiDashboard
    default:
      return qiyeDashboard
  }
})
</script>

<template>
  <component :is="dashboard" />
</template>
